package com.gfxy.modules.index.controller;

import com.alibaba.fastjson.JSONObject;
import com.gfxy.modules.index.service.ResarchIndexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description: TODO
 * @author: scott
 * @date: 2021年11月10日 13:40
 */

@Api(tags="科研详情报表")
@RestController
@RequestMapping("index/resarchIndex")
@Slf4j
public class ResarchIndexController {

    @Autowired
    private ResarchIndexService resarchIndexService;

    @AutoLog(value = "根据用户名和时间查询用户教学建设总积分")
    @ApiOperation(value="根据用户名和时间查询用户教学建设总积分", notes="根据用户名和时间查询用户教学建设总积分")
    @GetMapping(value = "/getResarchTeachingBuildResult")
    public Result<?> getTeacherTeachingBuildResult(@RequestParam(name="username",required=true) String username,
                                                   @RequestParam(name="date",required=true) String date,
                                                   HttpServletRequest req) {
        log.debug("开始查询教师[{}]的教学建设总积分", username);
        JSONObject result = resarchIndexService.getTeacherTeachingBuildResult(username,date);
        return Result.OK(result);
    }

}
